<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, user-scalable=0, minimal-ui">
    <meta name="viewport" content="target-densitydpi=220,width=440,user-scalable=no">
    <title>抢红包</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/swiper.min.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/index.css">
</head>
<body>
<header class="clearfloat">
    <img src="__IMG__/img1.png" alt="">
    <div class="tle">618理想狂欢节</div>
    <div class="share">分享赚88￥</div>
</header>

<div class="red-box">
    <div class="logo"><img src="__IMG__/img2.png" alt=""></div>
    <div class="bag"><img src="__IMG__/img3.png" alt=""></div>
    <div class="money-box">
        <div class="txt" id="success">恭喜你抢到了xx元红包</div>
        <button class="btn" id="lingqu">立即领红包</button>
        <div class="time">下次红包开始时间：{$config['value']}</div>
    </div>
    <div class="share-box clearfloat">
        <div class="pass">
            <p>专属口令已生成€jArr0x211€</p>
            <p>复制口令邀请微信好友</p>
        </div>
        <button class="btn">分享微信</button>
    </div>
</div>

<div class="follow-box clearfloat">
    <img src="__IMG__/img4.png" alt="">
    <div class="txt">
        <p class="p1">爱赞优惠卷</p>
        <p class="p2">服务由该生活号商户独家提供</p>
    </div>
    <button class="btn">关注</button>
</div>

<div class="other-box">
    <div class="tle-div">其他活动</div>
    <ul>
        <li>
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </li>
        <li>
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </li>
        <li>
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                    <div class="swiper-slide"><img src="__IMG__/img5.png" alt=""></div>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </li>
    </ul>
</div>
</body>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/swiper.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        var mySwiper = new Swiper('.swiper-container', {
            pagination : '.swiper-pagination'
        })


        $("#lingqu").click(function(){
            $.ajax({
              type: 'POST',
              url: "{:U('trigger')}",
              data: { crowd_no: $red['crowd_no'] },
              dataType: 'json',
              success: function(data){
                if (data.code!==1){
                    alert(data.msg)
                }else{
                  $("success").text("恭喜你抢到了"+data.prize_amount+"元红包");
                  alert("恭喜您抽中"+data.prize_amount+"元红包")
                }
                //window.location.href='alipays://platformapi/startapp?appId=20000042&publicBizType=LIFE_APP&publicId='+app_id;
                 
              },
              error: function(xhr, type){
                alert("Ajax error!")
              }
            });
          
        })


    })
</script>
</html>